﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="wucTimKiemBenh.ascx.cs" Inherits="HeathCareSystem.wuc.wucTimKiemBenh" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<style type="text/css">
    .style1
    {
        width: 74%;
    }
    .style2
    {
        width: 83px;
        text-align: center;
    }
</style>
<table align="center" class="style1">
    <tr>
        <td colspan="2" style="text-align: center; font-size: x-large; font-weight: bold;
            color: #FF0000;">
            Tìm Kiếm Loại Bệnh
        </td>
    </tr>
    <tr>
        <td class="style2">
            Tên Bệnh:
        </td>
        <td>
            <asp:TextBox ID="txtTenBenh" runat="server" Height="23px" Width="180px" autocomplete="off"></asp:TextBox>
            <asp:AutoCompleteExtender ID="txtTenBenh_AutoCompleteExtender" runat="server" TargetControlID="txtTenBenh"
                UseContextKey="True" BehaviorID="AutoCompleteEx" ServicePath="~/Tier/AutoComplete.asmx"
                ServiceMethod="GetListTenLoaiBenh" MinimumPrefixLength="2" CompletionInterval="1000"
                EnableCaching="true" CompletionSetCount="20" CompletionListCssClass="autocomplete_completionListElement"
                CompletionListItemCssClass="autocomplete_listItem" CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
                DelimiterCharacters=";, :" ShowOnlyCurrentWordInCompletionListItem="true">
                <animations>
                    <OnShow>
                        <Sequence>
                            <%-- Make the completion list transparent and then show it --%>
                            <OpacityAction Opacity="0" />
                            <HideAction Visible="true" />
                            
                            <%--Cache the original size of the completion list the first time
                                the animation is played and then set it to zero --%>
                            <ScriptAction Script="
                                // Cache the size and setup the initial size
                                var behavior = $find('AutoCompleteEx');
                                if (!behavior._height) {
                                    var target = behavior.get_completionList();
                                    behavior._height = target.offsetHeight - 2;
                                    target.style.height = '0px';
                                }" />
                            
                            <%-- Expand from 0px to the appropriate size while fading in --%>
                            <Parallel Duration=".4">
                                <FadeIn />
                                <Length PropertyKey="height" StartValue="0" EndValueScript="$find('AutoCompleteEx')._height" />
                            </Parallel>
                        </Sequence>
                    </OnShow>
                    <OnHide>
                        <%-- Collapse down to 0px and fade out --%>
                        <Parallel Duration=".4">
                            <FadeOut />
                            <Length PropertyKey="height" StartValueScript="$find('AutoCompleteEx')._height" EndValue="0" />
                        </Parallel>
                    </OnHide>
                </animations>
            </asp:AutoCompleteExtender>&nbsp;<br />
        </td>
    </tr>
    <tr>
        <td class="style2">
            Triệu Chứng:
        </td>
        <td>
            &nbsp;
            <asp:TextBox ID="txtTrieuChung" runat="server" Height="22px" Width="181px"></asp:TextBox>
            <asp:AutoCompleteExtender ID="txtTrieuChung_AutoCompleteExtender" 
                runat="server" BehaviorID="AutoCompleteEx" 
                CompletionListCssClass="autocomplete_completionListElement" 
                CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" 
                CompletionListItemCssClass="autocomplete_listItem" 
                ServiceMethod="GetListTrieuChung" ServicePath="~/Tier/AutoComplete.asmx" 
                ShowOnlyCurrentWordInCompletionListItem="True" TargetControlID="txtTrieuChung" 
                UseContextKey="True">
            </asp:AutoCompleteExtender>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="btnTim" runat="server" Height="28px" Text="Tìm Kiếm" 
                Width="87px" onclick="btnTim_Click" />
            <br />
            <br />
            <br />
            <asp:GridView ID="gvKetQua" runat="server" Height="193px" Width="431px">
            </asp:GridView>
            <br />
            <br />
        </td>
    </tr>
</table>